import request from '@/utils/request';

import type {TrademarkResponseData,Trademark} from './type'

enum API{
    PAGELIST_URL = '/admin/product/baseTrademark/',
    SAVE_URL= '/admin/product/baseTrademark/save',
    UPDATE_URL = '/admin/product/baseTrademark/update',
    GET_URL = '/admin/product/baseTrademark/get/',
    DELETE_URL='/admin/product/baseTrademark/remove/'
}

//分页列表
export const requestPageList = (page:number,limit:number)=> request.get<any,TrademarkResponseData>(API.PAGELIST_URL+`${page}/${limit}`);
//添加
export const save = (data:Trademark)=> request.post<any,any>(API.SAVE_URL,data);
//修改
export const update = (data:Trademark)=> request.put<any,any>(API.UPDATE_URL,data);
//查询
export const get = (id:number)=> request.get<any,any>(API.GET_URL+`${id}`);
//删除
export const del = (id:number)=> request.delete<any,any>(API.DELETE_URL+`${id}`);
